﻿var React = require('react');
var CustomerDetail = React.createClass({

    propTypes: {
        initialData: React.PropTypes.object
    },
    //componentDidMount: function() {
    //    window.setInterval(this.loadCommentsFromServer, this.props.pollInterval);
    //},
    getInitialState: function () {
        return { data: this.props.initialData };
    },
    render: function () {
        return (
            <div className="page">
                <div className="container">
                    <div className="row-fluid accounttype">
                        <p className="accounttext"><span>   会员级别： </span> {this.state.data.AccInfo.Accdisidmc} </p>
                    </div>
                    <div className="row-fluid surplus">
                        <p className="accounttext"><span>余额：</span> {this.state.data.Balanceinfo.RealSum}</p>
                    </div>
                    <div className="row-fluid points">
                        <p className="accounttext"><span>红包：</span> {this.state.data.Balanceinfo.Acchb}</p>
                    </div>
                    <div className="row-fluid points">
                        <p className="accounttext"><span>积分：</span> {this.state.data.Balanceinfo.Accjfusable}</p>
                    </div>


                    <div className="row-fluid button_brow">
                        <div className="col-lg-6 col-xs-6 col-md-6 pull-left">
                            <a href={this.props.transactionDetailUrl}>
                                <button className="btn btn-info b btn-lg btn-block" type="button">余额变动</button>
                            </a>
                        </div>
                        <div className="col-lg-6 col-xs-6 col-md-6 pull-right">
                            <a href={this.props.integralDetailurl}>
                                <button className="btn btn-info b btn-lg btn-block" type="button">积分变动</button>
                            </a>

                        </div>
                    </div>
                </div>
            </div>
        );
    }
});
module.exports = CustomerDetail;

